package vip.xiaonuo.supplier.modular.base.categories.service;

import cn.hutool.core.lang.tree.Tree;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import vip.xiaonuo.supplier.modular.base.categories.entity.SupplierCategories;
import vip.xiaonuo.supplier.modular.base.categories.param.SupplierCategoriesAddParam;
import vip.xiaonuo.supplier.modular.base.categories.param.SupplierCategoriesEditParam;
import vip.xiaonuo.supplier.modular.base.categories.param.SupplierCategoriesIdParam;
import vip.xiaonuo.supplier.modular.base.categories.param.SupplierCategoriesPageParam;
import vip.xiaonuo.supplier.modular.structure.org.entity.SupplierOrg;

import java.util.List;

/**
 * 商品分类Service接口
 *
 * @author Mr.wu
 * @date  2024/10/22 17:18
 **/
public interface SupplierCategoriesService extends IService<SupplierCategories> {

    /**
     * 获取商品分类分页
     *
     * @author Mr.wu
     * @date  2024/10/22 17:18
     */
    Page<SupplierCategories> page(SupplierCategoriesPageParam supplierCategoriesPageParam);

    /**
     * 添加商品分类
     *
     * @author Mr.wu
     * @date  2024/10/22 17:18
     */
    void add(SupplierCategoriesAddParam supplierCategoriesAddParam);

    /**
     * 编辑商品分类
     *
     * @author Mr.wu
     * @date  2024/10/22 17:18
     */
    void edit(SupplierCategoriesEditParam supplierCategoriesEditParam);

    /**
     * 删除商品分类
     *
     * @author Mr.wu
     * @date  2024/10/22 17:18
     */
    void delete(List<SupplierCategoriesIdParam> supplierCategoriesIdParamList);

    /**
     * 获取商品分类详情
     *
     * @author Mr.wu
     * @date  2024/10/22 17:18
     */
    SupplierCategories detail(SupplierCategoriesIdParam supplierCategoriesIdParam);

    /**
     * 获取商品分类详情
     *
     * @author Mr.wu
     * @date  2024/10/22 17:18
     **/
    SupplierCategories queryEntity(String id);

    List<SupplierCategories> getAllCategoriesList();

    /**
     * 获取分类树
     *
     * @author Mr.wu
     * @date 2022/10/24 20:08
     */
    List<Tree<String>> tree();

    /**
     * 获取分类树选择器
     *
     * @author Mr.wu
     * @date 2024/10/24 20:08
     */
    List<Tree<String>> categoriesTreeSelector();

    List<SupplierCategories> getChildListById(List<SupplierCategories> originDataList, String id, boolean includeSelf);

    /**
     * 根据id获取所有的父数据列表
     *
     * @author xuyuxiang
     * @date 2022/8/15 14:55
     **/
    List<SupplierCategories> getParentListById(List<SupplierCategories> categoriesDataList, String id, boolean includeSelf);

    /**
     * 根据id获取数据
     *
     * @author xuyuxiang
     * @date 2022/8/15 14:55
     **/
    SupplierCategories getById(List<SupplierCategories> categoriesDataList, String id);

}
